package impl

import (
	"user_manger_go/dao"
	"user_manger_go/entity"
	"user_manger_go/service"
)

type UserServiceIml struct {
	UserDao dao.UserDao
}

func NewUserService(userDao dao.UserDao) service.UserService {
	return &UserServiceIml{
		UserDao: userDao,
	}
}

func (userService *UserServiceIml) GetUsers() []entity.User {
	return userService.UserDao.GetUsers()
}
func (userService *UserServiceIml) GetUserById(id int64) []entity.User {
	return nil
}

func (userService *UserServiceIml) DeleteById(id int64) {}

func (userService *UserServiceIml) InsertUser(userEntity entity.User) entity.User {
	return userService.UserDao.InsertUser(userEntity)
}

func (userService *UserServiceIml) UpdateUser(id int64, userEntity entity.User) {}
